<template>
    <div>
        <div v-if="!isLoggedIn">
            <Logon @login-success="handleLoginSuccess"></Logon>
        </div>
        <div v-if="isLoggedIn">
            <Sider style="position: fixed"></Sider>
            <main-page style="margin-left: 307px;"></main-page>
        </div>
    </div>
</template>

<script>
    import Logon from "@/components/logon/Logon.vue";
    import Sider from "@/components/sider/Sider.vue";
    import MainPage from "@/components/main/Main.vue";
    import CourseComponent from "@/views/course/CourseComponent";
    import HeartKnowledgeComponent from "@/views/heartKnowledge/heartKnowledgeComponent";
    import HeartMarkComponent from "./views/course/HeartMarkComponent.vue";
    import WReservation from "./views/WReservation/WReservation.vue";
    export default {
        components: {
            Logon,
            Sider,
            MainPage,
            CourseComponent,
            HeartKnowledgeComponent,
            HeartMarkComponent,
            WReservation
        },
        data() {
            return {
                isLoggedIn: false
            };
        },
        methods: {
            handleLoginSuccess() {
                this.isLoggedIn = true;
            }
        }
    };
</script>

<style>

</style>
